/**
 * Copyright 2015-现在 weavecode
 */
package com.wcs.exam.common.constant;

import lombok.AccessLevel;
import lombok.NoArgsConstructor;

/**
 * redis前缀工具类
 * <p>
 * 使用规则：库::表::key
 *
 * @author wcs
 */
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public final class RedisConstant {

    public static final String CONFIG_CACHE_NAME = "exam";

    /**
     * 默认等待时间，3秒
     */
    public static final Long DEFAULT_WAIT_TIME = 3L;

    /**
     * 默认租赁时间，10秒
     */
    public static final Long DEFAULT_LEASE_TIME = 10L;

    /**
     * 分隔字符
     */
    public static final String SEPARATOR = ":";

    /**
     * 系统模块
     */
    public interface System {
        String ADMIN_APIS = "admin:apis:";
        String VER_CODE = "ver:code:";
    }

    public interface Exam {

        /**
         * 素材
         */
        String MATERIAL = "material";

        /**
         * 题目信息
         */
        String QUESTION = "resource:question";

        /**
         * 题目导入
         */
        String QUESTION_IMPORT = "resource:question:import:";

        /**
         * 题目信息
         */
        String QUESTION_AI = "resource:question:ai";

        /**
         * 试卷信息
         */
        String PAPER = "resource:paper";

        /**
         * 试卷信息
         */
        String PAPER_VIEW = "resource:paper:view:";

        /**
         * 试卷大题
         */
        String PAPER_TITLE = "resource:paper:title:";

        /**
         * 试卷题目
         */
        String PAPER_QUESTION = "resource:paper:question:";

        /**
         * 试卷题目详情-用于按试卷缓存
         */
        String PAPER_QUESTION_DETAIL = "resource:paper:question:detail:";

        /**
         * 考试信息
         */
        String EXAM = "resource:exam";

        /**
         * 考试信息
         */
        String EXAM_VIEW = "resource:exam:view:";

        /**
         * 考试信息（开始考试）
         */
        String EXAM_START = "resource:exam:start:";

        /**
         * 考试信息（结束考试）
         */
        String EXAM_END = "resource:exam:end:";

        /**
         * 考试用户信息-处理
         */
        String EXAM_USER_HANDLER = "resource:exam_user:handler:";

        /**
         * 考试人脸错误申诉
         */
        String EXAM_FACE_ERROR_APPEAL_SUBMIT = "resource:exam_face_error_appeal:submit:";

        /**
         * 考勤签到
         */
        String ATTENDANCE_RECORD_DETECT_AUTH = "resource:attendance_record:detect_auth:";
    }

    public interface Common {

        /**
         * 标签信息
         */
        String TAG_SAVE = "user:tag:save";

        /**
         * 交易订单
         */
        String ORDER_INFO = "user:order_info:";

        /**
         * APP实名认证
         */
        String APP_CERTIFICATION = "user:app_certification:";

        /**
         * 考勤签到
         */
        String USERS_DETECT_AUTH = "user:users:detect_auth:";

        String CODE = "code:";
        String CODE_STAT = "code:stat:";
        String PRIVATE_KEY = "private:key:";
        String WX_USER = "wx:user:";
        String VER_CODE = "ver:code:";
    }

    public interface Other {

        /**
         * 微信小程序授权
         */
        String WX_MINI_APP_AUTH = "wx_mini_app_auth:";

        /**
         * 支付微信证书
         */
        String WX_CERT = "wx_cert:";

        /**
         * 订单号（生成订单随机数时使用）
         */
        String ORDER_NO = "order_no:";
    }
}
